package com.gzhryc.shared_device.common.payment.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.shared_device.base.enums.EAppletsJumpType;
import com.gzhryc.shared_device.common.payment.dao.enums.WXPayConfigEnum;

import java.util.Date;

/**
 * 支付账号组
 * @version 2023-10-07
 */
@Table(name="payment_account_group")
public class PayAccountGroup {

    @Id(autoIncrement = 10)
    protected Long id;

    @Column(note = "支付账号组名称")
    protected String name;

    @Column(name = "wx_transfer", notNull = true, defVal = "0", note = "是否启用微信提现")
    protected Boolean wxTransfer;

    @Column(name = "wx_transfer_app_type", note = "微信提现的APP类型")
    protected Integer wxTransferAppType;

    @Column(name = "wx_transfer_app_id", note = "微信提现的APPID")
    protected String wxTransferAppId;

    @Column(name = "applets_jump_type",notNull = true,defVal = "1", note = "微信小程序跳转类型")
    protected Integer appletsJumpType;

    @Column(name = "applets_path", note = "微信小程序跳转路径")
    protected String appletsPath;

    @Column(name = "can_transfer",notNull = true,defVal = "0",note = "代理是否可提现")
    protected Boolean canTransfer;

    @Column(name = "day_total_money",notNull = true,defVal = "5000000",note = "代理每天总提现金额")
    protected Integer dayTotalMoney;

    @Column(name = "transfer_config", type = "TEXT", note = "代理提现配置")
    protected String transferConfig;

    @Column(name = "member_can_transfer",notNull = true,defVal = "0",note = "会员是否可提现")
    protected Boolean memberCanTransfer;

    @Column(name = "member_day_total_money",notNull = true,defVal = "5000000",note = "会员每天总提现金额")
    protected Integer memberDayTotalMoney;

    @Column(name = "member_transfer_config", type = "TEXT", note = "会员提现配置")
    protected String memberTransferConfig;

    @Column(name = "update_date", note = "修改时间", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date", note = "创建时间")
    protected Date createDate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean getWxTransfer() {
        return wxTransfer;
    }

    public void setWxTransfer(Boolean wxTransfer) {
        this.wxTransfer = wxTransfer;
    }

    public Integer getWxTransferAppType() {
        return wxTransferAppType;
    }

    public void setWxTransferAppType(Integer wxTransferAppType) {
        this.wxTransferAppType = wxTransferAppType;
    }

    public String getWxTransferAppId() {
        return wxTransferAppId;
    }

    public void setWxTransferAppId(String wxTransferAppId) {
        this.wxTransferAppId = wxTransferAppId;
    }

    public Integer getAppletsJumpType() {
        return appletsJumpType;
    }

    public void setAppletsJumpType(Integer appletsJumpType) {
        this.appletsJumpType = appletsJumpType;
    }

    public String getAppletsPath() {
        return appletsPath;
    }

    public void setAppletsPath(String appletsPath) {
        this.appletsPath = appletsPath;
    }

    public Boolean getCanTransfer() {
        return canTransfer;
    }

    public void setCanTransfer(Boolean canTransfer) {
        this.canTransfer = canTransfer;
    }

    public Integer getDayTotalMoney() {
        return dayTotalMoney;
    }

    public void setDayTotalMoney(Integer dayTotalMoney) {
        this.dayTotalMoney = dayTotalMoney;
    }

    public String getTransferConfig() {
        return transferConfig;
    }

    public void setTransferConfig(String transferConfig) {
        this.transferConfig = transferConfig;
    }

    public Boolean getMemberCanTransfer() {
        return memberCanTransfer;
    }

    public void setMemberCanTransfer(Boolean memberCanTransfer) {
        this.memberCanTransfer = memberCanTransfer;
    }

    public Integer getMemberDayTotalMoney() {
        return memberDayTotalMoney;
    }

    public void setMemberDayTotalMoney(Integer memberDayTotalMoney) {
        this.memberDayTotalMoney = memberDayTotalMoney;
    }

    public String getMemberTransferConfig() {
        return memberTransferConfig;
    }

    public void setMemberTransferConfig(String memberTransferConfig) {
        this.memberTransferConfig = memberTransferConfig;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getWxTransferAppTypeName(){
        return WXPayConfigEnum.AppType.note(this.wxTransferAppType);
    }

    public String getAppletsJumpTypeName(){
        return EAppletsJumpType.note(this.appletsJumpType);
    }

    public String getDayTotalMoneyStr(){
        return NumberTools.getMoneyStr(this.dayTotalMoney);
    }

    public String getMemberDayTotalMoneyStr(){
        return NumberTools.getMoneyStr(this.memberDayTotalMoney);
    }
}
